package com.yljk.mydoctor.utils;

import android.content.Context;
import android.os.Bundle;

import com.alibaba.android.arouter.launcher.ARouter;
import com.yljk.servicemanager.constants.RouterApi;
import com.yljk.servicemanager.interfaceapi.MineBackApi;

public class MineUtils {

    /**
     * android-rn
     * @param context
     * @param pluginId
     * @param componentName
     */
    public static void push(Context context, String pluginId, String componentName){
        MineBackApi mineBackApi = (MineBackApi) ARouter.getInstance().build(RouterApi.MINEBACKIMPL).navigation();
        mineBackApi.onListClick(context,pluginId,componentName);
    }

    public static void toMediaPageByUrl(String url){
        MineBackApi mineBackApi = (MineBackApi) ARouter.getInstance().build(RouterApi.MINEBACKIMPL).navigation();
        mineBackApi.toMediaPageByUrl(url);
    }

    /**
     * rn-android
     * @param context
     * @param pluginId
     * @param componentName
     * @param bundle
     */
    public static void push(Context context, String pluginId, String componentName, Bundle bundle){
        MineBackApi mineBackApi = (MineBackApi) ARouter.getInstance().build(RouterApi.MINEBACKIMPL).navigation();
        mineBackApi.onListClick2(context,pluginId,componentName,bundle);
    }


}
